package com.rjj.wlqq.wxpay.wxpay.tool;

import cn.hutool.json.JSONUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * @author r
 * @date 2021/1/19 21:41
 */
public class EntityKit
{
    public static <T> Map<String, String> entityToHashMap(T t)
    {
        Map<String, String> map = new HashMap<>();
        final String s = JSONUtil.toJsonStr(t);
        return JSONUtil.toBean(s, map.getClass());
    }
}
